camera_set_view_angle


描述

你可以使用此函数来更新视野摄像机的角度。你需要提供摄像机的独特ID(被另外的camera_create 函数所创建)以及你所希望的摄像机角度。默认值是0,如果将此值设为正数,那么摄像机将会逆时针旋转,即:把它设为90度而让他向左旋转90度。


语法:

camera_set_view_angle(camera_id, angle)


参数:

参数 描述
camera_id 创建相机时返回的唯一相机 id 值
角度 摄像机的新角度


返回:

N/A(无返回值)


例如:

camera_set_view_angle(view_camera[0], point_direction(x, y, mouse_x, mouse_y));

上述代码用于设置被分配给view port[0]的摄像机的视野摄像机角度。


上一页: Cameras
下一页: camera_set_view_target
© Copyright YoYo Games Ltd. 2018 All Rights Reserved